package(default_testonly = 1)

licenses(["notice"])

java_test(
    name = "AesGcmHpkeAeadTest",
    size = "small",
    srcs = ["AesGcmHpkeAeadTest.java"],
    data = ["//testdata/testvectors:hpke_boringssl"],
    deps = [
        "//src/main/java/com/google/crypto/tink/hybrid/internal:aes_gcm_hpke_aead",
        "//src/main/java/com/google/crypto/tink/hybrid/internal:hpke_util",
        "//src/main/java/com/google/crypto/tink/testing:hpke_test_util",
        "//src/main/java/com/google/crypto/tink/testing:test_util",
        "@maven//:com_google_guava_guava",
        "@maven//:com_google_truth_truth",
        "@maven//:junit_junit",
    ],
)

java_test(
    name = "ChaCha20Poly1305HpkeAeadTest",
    size = "small",
    srcs = ["ChaCha20Poly1305HpkeAeadTest.java"],
    data = ["//testdata/testvectors:hpke_boringssl"],
    deps = [
        "//src/main/java/com/google/crypto/tink/hybrid/internal:chacha20_poly1305_hpke_aead",
        "//src/main/java/com/google/crypto/tink/hybrid/internal:hpke_util",
        "//src/main/java/com/google/crypto/tink/testing:hpke_test_util",
        "//src/main/java/com/google/crypto/tink/testing:test_util",
        "@maven//:com_google_guava_guava",
        "@maven//:com_google_truth_truth",
        "@maven//:junit_junit",
    ],
)

java_test(
    name = "HkdfHpkeKdfTest",
    size = "small",
    srcs = ["HkdfHpkeKdfTest.java"],
    data = ["//testdata/testvectors:hpke_boringssl"],
    deps = [
        "//src/main/java/com/google/crypto/tink/hybrid/internal:hkdf_hpke_kdf",
        "//src/main/java/com/google/crypto/tink/hybrid/internal:hpke_util",
        "//src/main/java/com/google/crypto/tink/subtle:bytes",
        "//src/main/java/com/google/crypto/tink/subtle:hex",
        "//src/main/java/com/google/crypto/tink/subtle:x25519",
        "//src/main/java/com/google/crypto/tink/testing:hpke_test_util",
        "//src/main/java/com/google/crypto/tink/testing:test_util",
        "@maven//:com_google_guava_guava",
        "@maven//:com_google_truth_truth",
        "@maven//:junit_junit",
    ],
)

java_test(
    name = "HpkeContextTest",
    size = "small",
    srcs = ["HpkeContextTest.java"],
    data = ["//testdata/testvectors:hpke_boringssl"],
    deps = [
        "//src/main/java/com/google/crypto/tink:insecure_secret_key_access",
        "//src/main/java/com/google/crypto/tink/hybrid:hpke_parameters",
        "//src/main/java/com/google/crypto/tink/hybrid:hpke_private_key",
        "//src/main/java/com/google/crypto/tink/hybrid:hpke_public_key",
        "//src/main/java/com/google/crypto/tink/hybrid/internal:hpke_aead",
        "//src/main/java/com/google/crypto/tink/hybrid/internal:hpke_context",
        "//src/main/java/com/google/crypto/tink/hybrid/internal:hpke_kdf",
        "//src/main/java/com/google/crypto/tink/hybrid/internal:hpke_kem",
        "//src/main/java/com/google/crypto/tink/hybrid/internal:hpke_kem_key_factory",
        "//src/main/java/com/google/crypto/tink/hybrid/internal:hpke_kem_private_key",
        "//src/main/java/com/google/crypto/tink/hybrid/internal:hpke_primitive_factory",
        "//src/main/java/com/google/crypto/tink/hybrid/internal:hpke_util",
        "//src/main/java/com/google/crypto/tink/subtle:random",
        "//src/main/java/com/google/crypto/tink/testing:hpke_test_util",
        "//src/main/java/com/google/crypto/tink/testing:test_util",
        "//src/main/java/com/google/crypto/tink/util:bytes",
        "//src/main/java/com/google/crypto/tink/util:secret_bytes",
        "@maven//:com_google_guava_guava",
        "@maven//:com_google_truth_truth",
        "@maven//:junit_junit",
    ],
)

java_test(
    name = "HpkeEncryptDecryptTest",
    size = "small",
    srcs = ["HpkeEncryptDecryptTest.java"],
    deps = [
        "//src/main/java/com/google/crypto/tink:hybrid_decrypt",
        "//src/main/java/com/google/crypto/tink:hybrid_encrypt",
        "//src/main/java/com/google/crypto/tink:insecure_secret_key_access",
        "//src/main/java/com/google/crypto/tink/hybrid:hpke_parameters",
        "//src/main/java/com/google/crypto/tink/hybrid:hpke_private_key",
        "//src/main/java/com/google/crypto/tink/hybrid:hpke_public_key",
        "//src/main/java/com/google/crypto/tink/hybrid/internal:hpke_decrypt",
        "//src/main/java/com/google/crypto/tink/hybrid/internal:hpke_encrypt",
        "//src/main/java/com/google/crypto/tink/hybrid/internal/testing:hpke_test_util",
        "//src/main/java/com/google/crypto/tink/hybrid/internal/testing:hybrid_test_vector",
        "//src/main/java/com/google/crypto/tink/subtle:bytes",
        "//src/main/java/com/google/crypto/tink/subtle:hex",
        "//src/main/java/com/google/crypto/tink/subtle:random",
        "//src/main/java/com/google/crypto/tink/subtle:x25519",
        "//src/main/java/com/google/crypto/tink/util:bytes",
        "//src/main/java/com/google/crypto/tink/util:secret_bytes",
        "@maven//:com_google_truth_truth",
        "@maven//:junit_junit",
    ],
)

java_test(
    name = "HpkeKemKeyFactoryTest",
    size = "small",
    srcs = ["HpkeKemKeyFactoryTest.java"],
    data = ["//testdata/testvectors:hpke_boringssl"],
    deps = [
        "//src/main/java/com/google/crypto/tink:insecure_secret_key_access",
        "//src/main/java/com/google/crypto/tink/hybrid:hpke_parameters",
        "//src/main/java/com/google/crypto/tink/hybrid:hpke_private_key",
        "//src/main/java/com/google/crypto/tink/hybrid:hpke_public_key",
        "//src/main/java/com/google/crypto/tink/hybrid/internal:hpke_kem_key_factory",
        "//src/main/java/com/google/crypto/tink/hybrid/internal:hpke_kem_private_key",
        "//src/main/java/com/google/crypto/tink/hybrid/internal:hpke_util",
        "//src/main/java/com/google/crypto/tink/testing:hpke_test_util",
        "//src/main/java/com/google/crypto/tink/testing:test_util",
        "//src/main/java/com/google/crypto/tink/util:bytes",
        "//src/main/java/com/google/crypto/tink/util:secret_bytes",
        "@maven//:com_google_guava_guava",
        "@maven//:com_google_truth_truth",
        "@maven//:junit_junit",
    ],
)

java_test(
    name = "HpkePrimitiveFactoryTest",
    size = "small",
    srcs = ["HpkePrimitiveFactoryTest.java"],
    deps = [
        "//src/main/java/com/google/crypto/tink/hybrid:hpke_parameters",
        "//src/main/java/com/google/crypto/tink/hybrid/internal:aes_gcm_hpke_aead",
        "//src/main/java/com/google/crypto/tink/hybrid/internal:chacha20_poly1305_hpke_aead",
        "//src/main/java/com/google/crypto/tink/hybrid/internal:hkdf_hpke_kdf",
        "//src/main/java/com/google/crypto/tink/hybrid/internal:hpke_aead",
        "//src/main/java/com/google/crypto/tink/hybrid/internal:hpke_kdf",
        "//src/main/java/com/google/crypto/tink/hybrid/internal:hpke_kem",
        "//src/main/java/com/google/crypto/tink/hybrid/internal:hpke_primitive_factory",
        "//src/main/java/com/google/crypto/tink/hybrid/internal:hpke_util",
        "//src/main/java/com/google/crypto/tink/hybrid/internal:nist_curves_hpke_kem",
        "//src/main/java/com/google/crypto/tink/hybrid/internal:x25519_hpke_kem",
        "@maven//:com_google_truth_truth",
        "@maven//:junit_junit",
    ],
)

java_test(
    name = "HpkePrivateKeyManagerTest",
    size = "small",
    srcs = ["HpkePrivateKeyManagerTest.java"],
    deps = [
        "//src/main/java/com/google/crypto/tink:hybrid_decrypt",
        "//src/main/java/com/google/crypto/tink:hybrid_encrypt",
        "//src/main/java/com/google/crypto/tink:insecure_secret_key_access",
        "//src/main/java/com/google/crypto/tink:key_templates",
        "//src/main/java/com/google/crypto/tink:parameters",
        "//src/main/java/com/google/crypto/tink:registry_cluster",
        "//src/main/java/com/google/crypto/tink:tink_proto_keyset_format",
        "//src/main/java/com/google/crypto/tink/hybrid:hpke_private_key",
        "//src/main/java/com/google/crypto/tink/hybrid:hybrid_config",
        "//src/main/java/com/google/crypto/tink/hybrid/internal/testing:hpke_test_util",
        "//src/main/java/com/google/crypto/tink/hybrid/internal/testing:hybrid_test_vector",
        "//src/main/java/com/google/crypto/tink/internal:key_manager_registry",
        "//src/main/java/com/google/crypto/tink/subtle:hex",
        "//src/main/java/com/google/crypto/tink/testing:test_util",
        "@maven//:com_google_code_findbugs_jsr305",
        "@maven//:com_google_truth_truth",
        "@maven//:junit_junit",
    ],
)

java_test(
    name = "NistCurvesHpkeKemTest",
    size = "small",
    srcs = ["NistCurvesHpkeKemTest.java"],
    data = ["//testdata/testvectors:hpke_boringssl"],
    deps = [
        "//src/main/java/com/google/crypto/tink:insecure_secret_key_access",
        "//src/main/java/com/google/crypto/tink/hybrid:hpke_parameters",
        "//src/main/java/com/google/crypto/tink/hybrid:hpke_private_key",
        "//src/main/java/com/google/crypto/tink/hybrid:hpke_public_key",
        "//src/main/java/com/google/crypto/tink/hybrid/internal:hpke_kem_encap_output",
        "//src/main/java/com/google/crypto/tink/hybrid/internal:hpke_kem_key_factory",
        "//src/main/java/com/google/crypto/tink/hybrid/internal:hpke_kem_private_key",
        "//src/main/java/com/google/crypto/tink/hybrid/internal:hpke_util",
        "//src/main/java/com/google/crypto/tink/hybrid/internal:nist_curves_hpke_kem",
        "//src/main/java/com/google/crypto/tink/hybrid/internal:nist_curves_hpke_kem_private_key",
        "//src/main/java/com/google/crypto/tink/subtle:elliptic_curves",
        "//src/main/java/com/google/crypto/tink/testing:hpke_test_util",
        "//src/main/java/com/google/crypto/tink/testing:test_util",
        "//src/main/java/com/google/crypto/tink/util:bytes",
        "//src/main/java/com/google/crypto/tink/util:secret_bytes",
        "@maven//:com_google_guava_guava",
        "@maven//:com_google_truth_truth",
        "@maven//:junit_junit",
    ],
)

java_test(
    name = "X25519HpkeKemPrivateKeyTest",
    size = "small",
    srcs = ["X25519HpkeKemPrivateKeyTest.java"],
    deps = [
        "//src/main/java/com/google/crypto/tink/hybrid/internal:x25519_hpke_kem_private_key",
        "//src/main/java/com/google/crypto/tink/subtle:x25519",
        "//src/main/java/com/google/crypto/tink/util:bytes",
        "@maven//:com_google_truth_truth",
        "@maven//:junit_junit",
    ],
)

java_test(
    name = "X25519HpkeKemTest",
    size = "small",
    srcs = ["X25519HpkeKemTest.java"],
    data = ["//testdata/testvectors:hpke_boringssl"],
    deps = [
        "//src/main/java/com/google/crypto/tink/hybrid/internal:hkdf_hpke_kdf",
        "//src/main/java/com/google/crypto/tink/hybrid/internal:hpke_kem_encap_output",
        "//src/main/java/com/google/crypto/tink/hybrid/internal:hpke_kem_private_key",
        "//src/main/java/com/google/crypto/tink/hybrid/internal:hpke_util",
        "//src/main/java/com/google/crypto/tink/hybrid/internal:x25519_hpke_kem",
        "//src/main/java/com/google/crypto/tink/hybrid/internal:x25519_hpke_kem_private_key",
        "//src/main/java/com/google/crypto/tink/testing:hpke_test_util",
        "//src/main/java/com/google/crypto/tink/testing:test_util",
        "@maven//:com_google_guava_guava",
        "@maven//:com_google_truth_truth",
        "@maven//:junit_junit",
    ],
)

java_test(
    name = "LegacyFullHybridDecryptTest",
    size = "small",
    srcs = ["LegacyFullHybridDecryptTest.java"],
    deps = [
        "//proto:hpke_java_proto",
        "//proto:tink_java_proto",
        "//src/main/java/com/google/crypto/tink:hybrid_decrypt",
        "//src/main/java/com/google/crypto/tink:insecure_secret_key_access",
        "//src/main/java/com/google/crypto/tink:registry",
        "//src/main/java/com/google/crypto/tink/hybrid/internal:legacy_full_hybrid_decrypt",
        "//src/main/java/com/google/crypto/tink/hybrid/internal/testing:legacy_hybrid_decrypt_key_manager",
        "//src/main/java/com/google/crypto/tink/hybrid/internal/testing:legacy_hybrid_encrypt_key_manager",
        "//src/main/java/com/google/crypto/tink/internal:legacy_proto_key",
        "//src/main/java/com/google/crypto/tink/internal:proto_key_serialization",
        "//src/main/java/com/google/crypto/tink/subtle:bytes",
        "//src/main/java/com/google/crypto/tink/subtle:hex",
        "@maven//:com_google_code_findbugs_jsr305",
        "@maven//:com_google_protobuf_protobuf_java",
        "@maven//:com_google_truth_truth",
        "@maven//:junit_junit",
    ],
)

java_test(
    name = "LegacyFullHybridEncryptTest",
    size = "small",
    srcs = ["LegacyFullHybridEncryptTest.java"],
    deps = [
        "//proto:hpke_java_proto",
        "//proto:tink_java_proto",
        "//src/main/java/com/google/crypto/tink:hybrid_decrypt",
        "//src/main/java/com/google/crypto/tink:hybrid_encrypt",
        "//src/main/java/com/google/crypto/tink:insecure_secret_key_access",
        "//src/main/java/com/google/crypto/tink:registry",
        "//src/main/java/com/google/crypto/tink/hybrid/internal:legacy_full_hybrid_decrypt",
        "//src/main/java/com/google/crypto/tink/hybrid/internal:legacy_full_hybrid_encrypt",
        "//src/main/java/com/google/crypto/tink/hybrid/internal/testing:legacy_hybrid_decrypt_key_manager",
        "//src/main/java/com/google/crypto/tink/hybrid/internal/testing:legacy_hybrid_encrypt_key_manager",
        "//src/main/java/com/google/crypto/tink/internal:legacy_proto_key",
        "//src/main/java/com/google/crypto/tink/internal:proto_key_serialization",
        "//src/main/java/com/google/crypto/tink/subtle:hex",
        "@maven//:com_google_code_findbugs_jsr305",
        "@maven//:com_google_protobuf_protobuf_java",
        "@maven//:com_google_truth_truth",
        "@maven//:junit_junit",
    ],
)

java_test(
    name = "EciesProtoSerializationTest",
    size = "small",
    srcs = ["EciesProtoSerializationTest.java"],
    deps = [
        "//proto:common_java_proto",
        "//proto:ecies_aead_hkdf_java_proto",
        "//proto:tink_java_proto",
        "//proto:xchacha20_poly1305_java_proto",
        "//src/main/java/com/google/crypto/tink:insecure_secret_key_access",
        "//src/main/java/com/google/crypto/tink:key",
        "//src/main/java/com/google/crypto/tink:key_templates",
        "//src/main/java/com/google/crypto/tink:parameters",
        "//src/main/java/com/google/crypto/tink/aead:aead_config",
        "//src/main/java/com/google/crypto/tink/aead:x_cha_cha20_poly1305_parameters",
        "//src/main/java/com/google/crypto/tink/hybrid:ecies_parameters",
        "//src/main/java/com/google/crypto/tink/hybrid:ecies_private_key",
        "//src/main/java/com/google/crypto/tink/hybrid:ecies_public_key",
        "//src/main/java/com/google/crypto/tink/hybrid/internal:ecies_proto_serialization",
        "//src/main/java/com/google/crypto/tink/internal:key_template_proto_converter",
        "//src/main/java/com/google/crypto/tink/internal:mutable_serialization_registry",
        "//src/main/java/com/google/crypto/tink/internal:proto_key_serialization",
        "//src/main/java/com/google/crypto/tink/internal:proto_parameters_serialization",
        "//src/main/java/com/google/crypto/tink/internal:tink_bug_exception",
        "//src/main/java/com/google/crypto/tink/subtle:hex",
        "//src/main/java/com/google/crypto/tink/subtle:random",
        "//src/main/java/com/google/crypto/tink/subtle:x25519",
        "//src/main/java/com/google/crypto/tink/util:bytes",
        "//src/main/java/com/google/crypto/tink/util:secret_big_integer",
        "//src/main/java/com/google/crypto/tink/util:secret_bytes",
        "@maven//:com_google_code_findbugs_jsr305",
        "@maven//:com_google_protobuf_protobuf_java",
        "@maven//:com_google_truth_truth",
        "@maven//:junit_junit",
    ],
)

java_test(
    name = "HpkeUtilTest",
    size = "small",
    srcs = ["HpkeUtilTest.java"],
    deps = [
        "//src/main/java/com/google/crypto/tink/hybrid/internal:hpke_util",
        "@maven//:com_google_truth_truth",
        "@maven//:junit_junit",
    ],
)
